// pages/test/test.js
//import regeneratorRuntime from "regenerator-runtime";
const { regeneratorRuntime } = global;
import qs from "../../libs/qs/qs.js"
Page({
	data: {},

	async onLoad(options) {
		this.orderControl();
	},
	orderControl(){
		try {
			throw 'throw erro'
		} catch (error) {
			console.log(error);
		}
		finally{
			console.log('finally');
		}
	},
	fn1() {
		return new Promise((resolve, reject) => {
			setTimeout(() => {
				console.log("awit 1000ms");
				resolve();
			}, 1000);
		});
	},
	fn2() {
		return new Promise((resolve, reject) => {
			setTimeout(() => {
				console.log("awit 2000ms");
				resolve();
			}, 2000);
		});
	},
	async onShareAppMessage() {
		await this.fn2();
		return {
			path: `/pages/index/index`
		};
	}
});
